/*
 * @Descripttion:
 * @Author: Zhai Penghui
 * @Date: 2021-11-04 11:13:31
 */
const state = {
  collapsed: false,
};
const mutations = {
  TOGGLE_SIDEBAR: (state) => {
    state.collapsed = !state.collapsed;
    console.log(state.collapsed);
  },
};
const actions = {
  toggleSidebar({ commit }) {
    console.log("执行toggleSidebar");
    commit("TOGGLE_SIDEBAR");
  },
};
export default {
  namespaced: true, // 命名空间,用于在全局引用此文件里的方法时标识这一个的文件名。解决命名冲突问题
  state,
  mutations,
  actions,
};
